const bcrypt = require('bcryptjs')
const { sequelize } = require('../../../core/db');
const { Sequelize,Model } = require('sequelize');
const { NotFound,AuthFailed } = require('../../../core/httpException');

// 商品分类表
class GoodClass extends Model{

}

GoodClass.init({
    id:{
        type:Sequelize.INTEGER,
        primaryKey:true,
        autoIncrement:true
    },
    parent_id:{
        type:Sequelize.INTEGER
    },
    name:Sequelize.STRING,
    cover_img:Sequelize.TEXT,
    icon_img:Sequelize.TEXT
},{
    sequelize,
    tableName:'good_class'
})

// GoodClass.sync({alter:true })

module.exports = { GoodClass }